package Meb;

public class Client {
    public static void main(String[] args) {
        ChatGroup chatGroup = new ChatGroup();

        Member alice = new DiamondMember("Alice"); // 使用具体实现类
        Member bob = new CommonMember("Bob");

        chatGroup.register(alice); // 确保成员被正确注册
        chatGroup.register(bob);

        alice.sendText("Bob", "你好，Bob！让我们一起打篮球吧！");
        alice.sendImage("Bob", "smallPic.jpg");
        alice.sendImage("Bob", "tooLargePicture.jpg");

        bob.sendText("Alice", "你好，Alice！");
        bob.sendImage("Alice", "myPic.jpg"); // 应该输出普通会员不能发送图片
    }
}